home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / libkb100.zip / LIBKB-1.00 / UTIL / MAKEFILE < prev    next >
Text File  |  1996-07-23  |  2KB  |  73 lines

  1. #
  2. # Makefile for GNU make
  3. #
  4. # libkb -- a free, advanced and portable low-level keyboard library
  5. # Copyright (C) 1995, 1996 Markus Franz Xaver Johannes Oberhumer
  6. # For conditions of distribution and use, see copyright notice in kb.h 
  7. #
  8.  
  9.  
  10. # /***********************************************************************
  11. # // Configuration
  12. # ************************************************************************/
  13.  
  14. O := .o#            # object extension
  15. A := .a#            # library extension
  16. E := .out#            # executable extension
  17.  
  18. UNAME_M    := $(shell uname -m)
  19.  
  20.  
  21. # /***********************************************************************
  22. # // Compiler and linker flags
  23. # ************************************************************************/
  24.  
  25. CC            := gcc
  26. ## CFLAGS        += -v            # be verbose
  27. CFLAGS        += -Wall -W -pedantic    # all warnings on
  28. CFLAGS        += -O2             # optimize 
  29. ifeq ($(UNAME_M),i486)
  30. CFLAGS        += -m486             # optimize for 486
  31. endif
  32.  
  33. ### debugging
  34. ifeq (1,2)
  35. CFLAGS        += -g             # include debug information
  36. else
  37. CFLAGS        += -fomit-frame-pointer     # optimize (no debugging possible)
  38. LDFLAGS       += -s            # strip executable
  39. endif
  40.  
  41. ### bounds checking
  42. ifeq (1,2)
  43. CFLAGS        += -fbounds-checking
  44. LDFLAGS       += -fbounds-checking
  45. endif
  46.  
  47.  
  48. CFLAGS        := $(strip $(CFLAGS))
  49. LDFLAGS       := $(strip $(LDFLAGS))
  50. LDLIBS        := $(strip $(LDLIBS))
  51.  
  52.  
  53. # /***********************************************************************
  54. # // main targets
  55. # ************************************************************************/
  56.  
  57. .PHONY: default all
  58.  
  59. default: all
  60.  
  61. all: vt$E
  62.  
  63. vt$E: vt$O 
  64.     $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
  65.  
  66.  
  67. clean:
  68.     -$(RM) *.o *.out 
  69.  
  70. realclean: clean
  71.  
  72.  
  73.